with v8.Class_External_String_Resource_Base;
package v8.Class_External_String_Resource is
   type External_String_Resource is interface
     and v8.Class_External_String_Resource_Base.External_String_Resource_Base;
   type Pointer is access all External_String_Resource'Class;
   -- An ExternalStringResource is a wrapper around a two-byte string
   -- buffer that resides outside V8's heap. Implement an
   -- ExternalStringResource to manage the life cycle of the underlying
   -- buffer.  Note that the string data must be immutable.

   function Data
     (this : External_String_Resource
     ) return access uint16_t is abstract;
   -- The string data from the underlying buffer.

   function Length
     (this : External_String_Resource
     ) return size_t is abstract;
   -- The length of the string. That is, the number of two-byte characters.


end v8.Class_External_String_Resource;
